<template>
  <div>
    <el-collapse v-model="active">
      <el-collapse-item title="右键菜单" name="1">
        <ContextMenu />
      </el-collapse-item>
    </el-collapse>
  </div>
</template>

<script type="text/jsx">
  import EleDropdown from '@/components/dropdown';

  const ContextMenu = {
    name: 'drop-contextmenu',
    render () {
      return (
        <EleDropdown props={{trigger: "contextmenu", placement: "bottom"}}>
          <el-button>右键此处</el-button>
          <el-dropdown-menu slot="dropdown">
            <el-dropdown-item>菜单1</el-dropdown-item>
            <el-dropdown-item>菜单2</el-dropdown-item>
            <el-dropdown-item>菜单3</el-dropdown-item>
          </el-dropdown-menu>
        </EleDropdown>
      );
    }
  };

  export default {
    name: 'e-dropdown',
    components: {
      ContextMenu,
    },
    data () {
      return {active: ['1']};
    }
  }
</script>
